/*
** $Source: /cvs/cvsroot/inetipc/utils/data_dbg.h,v $
** $Revision: 1.1.1.1 $
** $Date: 2007/10/19 01:52:53 $
**
** File : data_dbg.h
** Date : Historic
*/
#ifndef DBGPRINT_H_
#define DBGPRINT_H_

#include <assert.h>
#include <stdlib.h>

#if ! defined (WIN32)
#define VLOG(arg...) VLOG0(arg, 0)

#define VLOG0(fmt, arg...) zDbgPrint(9, "[%s:%d]"fmt, __FILE__, __LINE__, arg)

#define DLOG(arg...) DLOG0(arg, 0)

#define DLOG0(fmt, arg...) zDbgPrint(3, "[%s:%d]"fmt, __FILE__, __LINE__, arg)
 
#define ELOG(arg...) ELOG0(arg, 0)

#define ELOG0(fmt, arg...) zDbgPrint(1, "[%s:%d]"fmt, __FILE__, __LINE__, arg)
 
#endif

#if defined (__cplusplus)
extern "C" {
#endif

int   set_debug(int v);

	void  zDbgPrint(int level, char *str, ...);

void  zDbgString(char *str, int size);

char *zStripPathA(char *path);
	
int open_dbg_shm(int size);
	
int close_dbg_shm(void);

#if defined (__cplusplus)
}
#endif

#if defined (WIN32)

  #if defined (UNICODE)

    #include <wchar.h>

    #define zStripPath(path) zStripPathW(path)

    wchar_t* zStripPathW(wchar_t *path);

  #else /* (UNICODE) not defined */

  #define zStripPath(path) zStripPathA(path)

  #endif /* (UNICODE) */

  typedef struct _timeb   timeb_t;


#else  // ! (WIN32)

  typedef struct timeb    timeb_t;

#endif // (WIN32)

void dbg_ftime(timeb_t *a);


#endif // DBGPRINT_H_

///////////////////////////////////////////////////////////////////////////
/*
Revision 1.2  2003/11/22 01:31:07  linz
Initial update

*/
